package shenlingdong;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Scanner;
public class Province {
    HashMap<String, ArrayList<String>> map=new HashMap<>();
    Scanner scanner = new Scanner(System.in);
    ArrayList arrayList = new ArrayList<>();
    ArrayList arrayList2 = new ArrayList<>();
    ArrayList arrayList3 = new ArrayList<>();

    public  void getin(){

        arrayList.add("曲靖");
        arrayList.add("昆明");

        arrayList2.add("呼伦贝尔");
        arrayList2.add("呼和浩特");

        arrayList3.add("洛阳");
        arrayList3.add("南阳");

        map.put("云南",arrayList);
        map.put("内蒙古",arrayList2);
        map.put("河南",arrayList3);


    }

    public void print(){
        Iterator<String> it=map.keySet().iterator();
        while (it.hasNext()){
            String key=it.next();
            System.out.print(key+"\t");
        }
    }

    public void choose(){

        System.out.println("输入省份");
        String choose = scanner.next();
        switch (choose){

            case "云南":
                System.out.println(map.get(choose));
                break;

            case "内蒙古":
                System.out.println(map.get(choose));
                break;

            case "河南":
                System.out.println(map.get(choose));
                break;

            default:
                System.out.println("未录入");
        }
    }
}
